package com.hzeport.bgs22emduty;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.web.socket.config.annotation.EnableWebSocket;

/**
 * 项目启动类
 * 
 * 注意:
 * - Swagger 通过 knife4j-spring-boot-starter 自动配置
 * - 多数据源通过 dynamic-datasource-spring-boot-starter 自动配置
 * - XXL-JOB 需要在配置文件中配置
 */
@SpringCloudApplication
@EnableAsync
@EnableFeignClients
@EnableWebSocket
public class WebApplication extends SpringBootServletInitializer {
    public static void main(String[] args) {
        SpringApplication.run(WebApplication.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(WebApplication.class);
    }
}
